package com.liuyi.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.liuyi.dao.VisitReservationMapper;
import com.liuyi.model.VisitReservation;
import com.liuyi.service.VisitReservationService;
import com.liuyi.util.CommonUtil;

@Service
public class VisitReservationServiceImpl implements VisitReservationService{

	@Autowired
	private VisitReservationMapper visitReservationDao;
	
	@Override
	public void insert(VisitReservation visitReservation) {
		visitReservationDao.insert(visitReservation);
	}

	@Override
	public List<VisitReservation> selectVisitReservationAll() {
		return visitReservationDao. selectVisitReservationAll();
	}

	@Override
	public JSONObject selectVisitReservationAll(JSONObject request2Json) {
		List<VisitReservation> list = visitReservationDao. selectVisitReservationAll();
		return CommonUtil.successJson(list);
	}

}
